<?php
   include "connect.php";
   
   $badgedata = $_POST['badgedata'];
   $badgedata  = explode(',', $badgedata[0]);
   $photo =  $badgedata[3];

 mysqli_query($con, "UPDATE badge_id SET photo = '$photo' WHERE id = '1' ");
  
echo "<center><img src=".$photo." alt='id badge photo'></center>";  

?>